<template>
    <v-layout>
        <template slot="header">
            虚拟列表
        </template>
        <template slot="content">
            <div class="exmple-box">
                <v-virtual-list :listConfig="listConfig" :dataSource="dataSource"></v-virtual-list>
            </div>
        </template>
    </v-layout>
</template>

<script>
import vLayout from "@/components/vLayout"
import vVirtualList from "@/components/vVirtualList"
export default {
    components: {
        vLayout,
        vVirtualList
    },
    data() {
        return {
            listConfig: {
                count: 20,
                itemHeight: 32
            },
            dataSource: []
        }
    },
    mounted() {
        for(let i = 0; i < 1000; i++) {
            this.dataSource.push({
                id: i,
                name: i + '_' + '张三'
            })
        }
    }
}
</script>

<style lang="less" scoped>
.exmple-box{

}
</style>
